package controllers

import (
	"fmt"

	beego "github.com/beego/beego/v2/server/web"
)

type PreparedOrderController struct {
	beego.Controller
}

func (c *PreparedOrderController) Get() {
	username := c.GetSession("username")
	if username == nil {
		c.Redirect("/", 302)
	}
	order_number, _ := c.GetInt("order_number")
	for k := 1; k <= order_number; k++ {
		c.Data["goodId"+fmt.Sprint(k)] = c.GetString("goodId" + fmt.Sprint(k))
	}
	c.TplName = "preparedOrder.tpl"
}
